home *** CD-ROM | disk | FTP | other *** search
- /*
- Copyright (c) 2002-2003 Macromedia, Inc.
- globalnav scripts
- Language: JavaScript 1.2
-
- */
-
- // called by globalnav.swf
- // sets the mediapref cookie
- function setFlash(flash_version_string) {
- var pixelName = 'flash_pixel';
- if (document[pixelName] && flash_version_string) {
- document[pixelName].src = '/set_media_pref?'+flash_version_string;
- }
- }
- function defineFunctions() {
- if (!document.getElementById) {
- if (document.layers) document.getElementById = function() { return; }
- if (document.all) document.getElementById = function(str) { return document.all[str]; }
- }
- }
- function positionContent(y) {
- var contentBox = document.getElementById('contentWrapper');
- if (y && contentBox) {
- contentBox.style.top = y + 'px';
- }
- }
- function calcGlobalnavHeight() {
- var globalmessage = document.getElementById('globalmessage');
- var gma_height = (globalmessage != null) ? globalmessage.height : 0;
- var height = 64 + gma_height + 8;
- return height;
- }
- //
- //
- function setSWFHeight(h) {
- if (document.getElementById('globalnav-object') != null) {
- document.getElementById('globalnav-object').setAttribute('height',h);
- }
- if (document.getElementById('globalnav-embed') != null) {
- document.getElementById('globalnav-embed').setAttribute('height',h);
- }
- }
- //
- function initPage() {
- defineFunctions();
- if (!document.getElementById('globalnav-object') &&
- !document.getElementById('globalnav-embed') &&
- !document.getElementById('globalnav-primary') &&
- !document.getElementById('global-message')) {
- positionContent(calcGlobalnavHeight());
- }
- /*
- else { // check for swf globalnav
- var isNew;
- if (document.getElementById('globalnav-object') != null) {
- var params = document.getElementsByTagName('param');
- for (var i=0; i<params.length; i++) {
- if (params[i].value.indexOf('2tier_en_us') != -1) isNew = true;
- }
- }
- if (document.getElementById('globalnav-embed') != null) {
- var swf = new String(document.getElementById('globalnav-embed').src);
- if (swf.indexOf('en_us') != -1) isNew = true;
- }
- if (isNew == false) {
- window.setTimeout('setSWFHeight(64)',200);
- positionContent(72);
- }
- }
- */
- }
-